Printing Multi-Valued Enumerated Attributes

I noticed that when I print a module with a multi valued enumerated attribute in the display (PDF or Printer) that the values print in the order of the related number even if this is not the order in which they are in the pick list or displayed in the column.

Even after I changed the Related number for each value to be in line with the way we display them, they still print out wrong. If I add or remove an attribute value for an object, that object will print out using the new number scheme, but objects that have not been changed print out the old way.

I tried filtering and adding a value to the displayed objects and then going back and removing, but this did not work. I ended up having to export the view to Word and create the PDF from that file.
Does anyone know how I can get this attribute to print out in the order it is displayed without touching every object?

Thanks
Lee
leefarmer - Wed Sep 07 15:58:42 EDT 2011

Re: Printing Multi-Valued Enumerated Attributes
llandale - Fri Sep 09 14:41:25 EDT 2011

If you rearrange the Enumerated values of the Type then the displayed values of the objects do NOT change until you update their values. I could guess why but who cares. This basically means you should run the following code after manipulating the Enums of a type:

string NameEnumAttr = 
"MyEnumeratedAttr" Object o 

for o in entire (current Module) 

do 
{  o.NameEnumAttr = o.NameEnumAttr 
}

  • Louie

Re: Printing Multi-Valued Enumerated Attributes
leefarmer - Mon Sep 12 08:28:42 EDT 2011

llandale - Fri Sep 09 14:41:25 EDT 2011
If you rearrange the Enumerated values of the Type then the displayed values of the objects do NOT change until you update their values. I could guess why but who cares. This basically means you should run the following code after manipulating the Enums of a type:


string NameEnumAttr = 
"MyEnumeratedAttr" Object o 

for o in entire (current Module) 

do 
{  o.NameEnumAttr = o.NameEnumAttr 
}

  • Louie

Louie

Thanks for the response, but my problem is not with how the enum is displayed but how it prints. The display is in the correct order. If I export to Word or Excel it is in the correct order. The problem is with printing (PDF or straight to the printer)or exporting to HTML. What I see is NOT what I get. The printout is in the old order. I don't understand why the enum gets rearranged using the related number when printed anyway. Any help is appreciated.

Thanks
Lee

Re: Printing Multi-Valued Enumerated Attributes
OurGuest - Mon Sep 12 12:02:38 EDT 2011

leefarmer - Mon Sep 12 08:28:42 EDT 2011
Louie

Thanks for the response, but my problem is not with how the enum is displayed but how it prints. The display is in the correct order. If I export to Word or Excel it is in the correct order. The problem is with printing (PDF or straight to the printer)or exporting to HTML. What I see is NOT what I get. The printout is in the old order. I don't understand why the enum gets rearranged using the related number when printed anyway. Any help is appreciated.

Thanks
Lee

You best solution might be to write a dxl that unsets the resets each modules value -- but that seems like a lot of work for just a print out.

Re: Printing Multi-Valued Enumerated Attributes
llandale - Mon Sep 12 12:11:44 EDT 2011

leefarmer - Mon Sep 12 08:28:42 EDT 2011
Louie

Thanks for the response, but my problem is not with how the enum is displayed but how it prints. The display is in the correct order. If I export to Word or Excel it is in the correct order. The problem is with printing (PDF or straight to the printer)or exporting to HTML. What I see is NOT what I get. The printout is in the old order. I don't understand why the enum gets rearranged using the related number when printed anyway. Any help is appreciated.

Thanks
Lee

I am not quite seeing what you are seeing. Using v9201.

Playing with multi-enumerates including one whose Related number is in reverse order, I see that no matter which order I select the values, they are always displayed in Related number sequence. When the related number is the same (typically zero) then they are displayed in the order in which they are currently listed.

... So 

this enumeration: Value  Related: 1      3 2     2 3     1 ... and I select values 
"2" and 
"3", will always (

for me) display: 3 2 ... no matter the order I select and de-select them.


So it appears, rightfully or wrongfully, that DOORS thinks the values 'should' display in Related number sequence.

I see it prints the way I see it. Using DXL, it seems to retrieve the values as they are seen.

If I rearrange the Related Numbers such that the object 'should' change the values (example above should then display 2..3), I see they display the old order (e.g. 3..2) until the obj-value changes. I see it prints the way its displayed and is retrieved the same way. However, I see that exporting to Excel they appear in the order in which they 'should' appear; so it now displayes 3..2 but exports 2..3.

To reconcile our different experiences, I wonder if what you think you are 'seeing' is what you are really seeing. Next to the displayed multi-enum column, insert a new column that has the exact attribute in question, to make sure the column you see is the one you think it is.

Is it possible this mutli-enumerated is an Attr-DXL? If so more testing is needed.

Try my code above to reset all the values and see if it 'fixes' anything.

If this doesn't reconcile what you see with what I see, then I'm stuck and hopefully someone with more experience can straighten us out.

  • Louie

Re: Printing Multi-Valued Enumerated Attributes
leefarmer - Mon Sep 19 07:14:40 EDT 2011

llandale - Mon Sep 12 12:11:44 EDT 2011
I am not quite seeing what you are seeing. Using v9201.

Playing with multi-enumerates including one whose Related number is in reverse order, I see that no matter which order I select the values, they are always displayed in Related number sequence. When the related number is the same (typically zero) then they are displayed in the order in which they are currently listed.


... So 

this enumeration: Value  Related: 1      3 2     2 3     1 ... and I select values 
"2" and 
"3", will always (

for me) display: 3 2 ... no matter the order I select and de-select them.


So it appears, rightfully or wrongfully, that DOORS thinks the values 'should' display in Related number sequence.

I see it prints the way I see it. Using DXL, it seems to retrieve the values as they are seen.

If I rearrange the Related Numbers such that the object 'should' change the values (example above should then display 2..3), I see they display the old order (e.g. 3..2) until the obj-value changes. I see it prints the way its displayed and is retrieved the same way. However, I see that exporting to Excel they appear in the order in which they 'should' appear; so it now displayes 3..2 but exports 2..3.

To reconcile our different experiences, I wonder if what you think you are 'seeing' is what you are really seeing. Next to the displayed multi-enum column, insert a new column that has the exact attribute in question, to make sure the column you see is the one you think it is.

Is it possible this mutli-enumerated is an Attr-DXL? If so more testing is needed.

Try my code above to reset all the values and see if it 'fixes' anything.

If this doesn't reconcile what you see with what I see, then I'm stuck and hopefully someone with more experience can straighten us out.

  • Louie

Louie

Thanks for the code. I finally got a chance to run this and it fixed my printing problem.

Lee